package com.lesson7.classadapter;

/**
 * @author 朝花不迟暮
 * @version 1.0
 * @date 2020/8/29 17:20
 */
public class Phone
{
    public void charging(IVoltage5V iVoltage5V){
        if(iVoltage5V.output5V() == 5){
            System.out.println("适配成功，可以充电！");
        }
        else {
            System.out.println("适配失败！");
        }
    }
}
